import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Menu from './components/menu.vue'
import Menu2 from './components/menu2.vue'
import About from './views/about.vue'
import Project from './views/project.vue'
import Projectlist from './views/projectlist.vue'
import Projectlist2 from './views/projectlist2.vue'
import login from './views/login.vue'
import ComponyInfo from './views/componyinfo.vue'
import JobInfo from './views/jobinfo.vue'
import JobInfo1 from './views/jobinfo1.vue'
import HiringStep from './views/hiringstep.vue'
import SpeakStep from './views/speakstep.vue'
import Share from './views/share.vue'
import faq from './views/faq.vue'
import vr360 from './views/vr360.vue'
import news from './views/news.vue'
import setup from './views/setup.vue'
import status from './views/status.vue'
import questionnaire from './views/questionnaire/index.vue'
import questionmgr from './views/questionnaire/question.vue'
import datamgr from './views/questionnaire/data.vue'
import stylemgr from './views/questionnaire/style.vue'
import staffnews from './views/reservestaff/news.vue'
import staffs from './views/reservestaff/staff.vue'
import reward from './views/reservestaff/reward.vue'
import signin from './views/reservestaff/signin.vue'
import train from './views/reservestaff/train.vue'
import traindata from './views/reservestaff/traindata.vue'
import activity from './views/reservestaff/activity.vue'
import activitydata from './views/reservestaff/activitydata.vue'
import task from './views/reservestaff/task.vue'
import taskdetail from './views/reservestaff/taskdetail.vue'
import tasklist from './views/reservestaff/tasklist.vue'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'home',
            meta: { requireAuth: true, show: true },
            components: {
                default: Home,
                second: Menu
            }
        },
        {
            path: '/帐号管理',
            name: '帐号管理',
            meta: { requireAuth: true, show: true },
            components: {
                default: Home,
                second: Menu
            }
        },
        {
            path: '/项目管理',
            name: '项目管理',
            meta: { requireAuth: true, show: true },
            components: {
                default: Projectlist,
                second: Menu
            }
        },
        {
            path: '/项目列表',
            name: '项目列表',
            meta: { requireAuth: true, show: true },
            components: {
                default: Projectlist2,
                second: Menu
            }
        },
        {
            path: '/项目后台',
            name: '项目后台',
            meta: { requireAuth: true, show: true },
            components: {
                default: Project,
                second: Menu2
            }
        },
        {
            path: '/login',
            name: 'login',
            meta: { requireAuth: false, show: false },
            components: {
                login: login
            }
        },
        {
            path: '/公司信息',
            name: '公司信息',
            meta: { requireAuth: true, show: true },
            components: {
                default: ComponyInfo,
                second: Menu2
            }
        },
        {
            path: '/校招职位',
            name: '校招职位',
            meta: { requireAuth: true, show: true },
            components: {
                default: JobInfo,
                second: Menu2
            }
        },
        {
          path: '/社招职位',
          name: '社招职位',
          meta: { requireAuth: true, show: true },
          components: {
              default: JobInfo1,
              second: Menu2
          }
        },
        {
            path: '/招聘流程',
            name: '招聘流程',
            meta: { requireAuth: true, show: true },
            components: {
                default: HiringStep,
                second: Menu2
            }
        },
        {
            path: '/宣讲行程',
            name: '宣讲行程',
            meta: { requireAuth: true, show: true },
            components: {
                default: SpeakStep,
                second: Menu2
            }
        },
        {
            path: '/项目分享',
            name: '项目分享',
            meta: { requireAuth: true, show: true },
            components: {
                default: Share,
                second: Menu2
            }
        },
        {
            path: '/Q&A',
            name: 'Q&A',
            meta: { requireAuth: true, show: true },
            components: {
                default: faq,
                second: Menu2
            }
        },
        {
            path: '/vr360',
            name: 'vr360',
            meta: { requireAuth: true, show: true },
            components: {
                default: vr360,
                second: Menu2
            }
        },
        {
            path: '/网申查询',
            name: '网申查询',
            meta: { requireAuth: true, show: true },
            components: {
                default: status,
                second: Menu2
            }
        },
        {
            path: '/最新资讯',
            name: '最新资讯',
            meta: { requireAuth: true, show: true },
            components: {
                default: news,
                second: Menu2
            }
        },
        {
            path: '/版块管理',
            name: '版块管理',
            meta: { requireAuth: true, show: true },
            components: {
                default: setup,
                second: Menu2
            }
        },
        {
            path: '/questionnaire',
            name: 'questionnaire',
            meta: { requireAuth: true, show: true },
            components: {
                default: questionnaire,
                second: Menu2
            }
        },
        {
            path: '/questionmgr',
            name: 'questionmgr',
            meta: { requireAuth: true, show: true },
            components: {
                default: questionmgr,
                second: Menu2
            }
        },
        {
            path: '/datamgr',
            name: 'datamgr',
            meta: { requireAuth: true, show: true },
            components: {
                default: datamgr,
                second: Menu2
            }
        },
        {
            path: '/stylemgr',
            name: 'stylemgr',
            meta: { requireAuth: true, show: true },
            components: {
                default: stylemgr,
                second: Menu2
            }
        },
        {
            path: '/staffnews',
            name: 'staffnews',
            meta: { requireAuth: true, show: true },
            components: {
                default: staffnews,
                second: Menu2
            }
        },
        {
            path: '/staffs',
            name: 'staffs',
            meta: { requireAuth: true, show: true },
            components: {
                default: staffs,
                second: Menu2
            }
        },
        {
            path: '/reward',
            name: 'reward',
            meta: { requireAuth: true, show: true },
            components: {
                default: reward,
                second: Menu2
            }
        },
        {
            path: '/signin',
            name: 'signin',
            meta: { requireAuth: true, show: true },
            components: {
                default: signin,
                second: Menu2
            }
        },
        {
            path: '/train',
            name: 'train',
            meta: { requireAuth: true, show: true },
            components: {
                default: train,
                second: Menu2
            }
        },
        {
            path: '/traindata',
            name: 'traindata',
            meta: { requireAuth: true, show: true },
            components: {
                default: traindata,
                second: Menu2
            }
        },
        {
            path: '/activity',
            name: 'activity',
            meta: { requireAuth: true, show: true },
            components: {
                default: activity,
                second: Menu2
            }
        },
        {
            path: '/activitydata',
            name: 'activitydata',
            meta: { requireAuth: true, show: true },
            components: {
                default: activitydata,
                second: Menu2
            }
        },
        {
            path: '/task',
            name: 'task',
            meta: { requireAuth: true, show: true },
            components: {
                default: task,
                second: Menu2
            },
            children: [
              {
                path: 'detail',
                name: "taskdetail",
                meta: { requireAuth: true, show: true },
                component: taskdetail
              },
              {
                path: '/',
                name: "tasklist",
                meta: { requireAuth: true, show: true },
                component: tasklist
              },
            ]
        }
    ]
})
